package dm1101.demo01;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/1 14:43
 */
public class TestSetPriority {
    public static void main(String[] args) {
        SetPriority p1 = new SetPriority();
        p1.setName("线程A");
        SetPriority p2 = new SetPriority();
        p2.setName("线程B");
        SetPriority p3 = new SetPriority();
        p3.setName("线程C");

        p1.setPriority(7);
        p2.setPriority(10);
        p3.setPriority(1);

        p1.start();
        p2.start();
        p3.start();


    }
}
class SetPriority extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName()+"====="+i);
        }
    }
}
